This disclosure relates generally to the field of graphics processing. More particularly, but not by way of limitation, this disclosure relates to methods for the non-intrusive monitoring of shader program execution during application development.
It is not uncommon to use host computer systems during the development of programs for mobile devices. At some point, however, it becomes necessary to execute such programs on the target platform. It is only then that the run-time performance/behavior of the program code may be determined. Many present-day portable device applications are graphics intensive. To support the needed graphics operations many portable devices incorporate one or more graphics processing units (GPUs). It can be particularly important to optimize shader program performance in such environments as one or a few inefficiently executing shader operations can have a noticeably deleterious effect on a program's overall behavior. For at least these reasons, it can be important to obtain accurate quantitative measurements of shader program run-time performance.
As used herein, the terms “shader program” or “shader” refer to programs specifically designed to execute on GPU hardware. Illustrative types of shader programs include vertex, geometry, tessellation (hull and domain) and fragment (or pixel) shaders. While the claimed subject matter is not so limited, at present only vertex and fragment shaders are supported by the OpenGL® ES standard—a well-known platform supporting the development of graphical applications on mobile platforms. (OPENGL is a registered trademark of Silicon Graphics, Inc.) In general, vertex shaders provide control over the position and other attributes in scenes involving three-dimensional (3D) models. In particular, vertex shaders transform each vertex's 3D position in virtual space to the corresponding two-dimensional (2D) coordinate at which it will appear on a screen. Output from a vertex shader may be sent directly to a rasterizer or to the next stage in a GPU's pipeline (e.g., a fragment shader). Fragment shaders, also known as pixel shaders, may be used to compute the color and other attributes of each pixel. Fragment shaders may, for example, be used to output a constant color or for the application of lighting values, shadows, specular highlights, and translucency.